home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Amiga Game Guide
/
AmigaGameGuide_CD.iso
/
Amiga
/
Game-Installer
/
WHD_Installers
/
Games_J-M
/
Moonstone Install
/
Install
next >
Wrap
Text File
|
1977-12-31
|
4KB
|
183 lines
;****************************
(set #sub-dir "data") ;sub directory containing data files
(set #readme-file "README") ;name of readme file
;****************************
;----------------------------
; Checks if given program is reachable via the path
; if not abort install
; IN: #program - to check
; OUT: -
(procedure P_chkrun
(if
(= 0 (run ("cd SYS:\nWhich %s" #program)))
("")
(abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
)
)
;****************************
(if
(exists #readme-file)
(if
(= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
("")
(run ("SYS:Utilities/More %s" #readme-file))
)
)
(set #program "WHDLoad")
(P_chkrun)
(set @default-dest
(askdir
(prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
(help @askdir-help)
(default @default-dest)
(disk)
)
)
(set #dest (tackon @default-dest @app-name))
(if
(exists #dest)
(
(set #choice
(askbool
(prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
(default 1)
(choices "Delete" "Skip")
(help @askbool-help)
)
)
(if
(= #choice 1)
(run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
)
)
)
(makedir #dest
(help @makedir-help)
(infos)
)
;----------------------------
(copyfiles
(help @copyfiles-help)
(source ("%s.Slave" @app-name))
(dest #dest)
)
(if
(exists ("%s.newicon" @app-name))
(set #icon
(askchoice
(prompt "\nWhich icon do you like to install ?\n")
(default 0)
(choices "Normal" "NewIcon")
(help @askchoice-help)
)
)
(set #icon 0)
)
(select #icon
(set #icon ("%s.inf" @app-name))
(set #icon ("%s.newicon" @app-name))
)
(copyfiles
(help @copyfiles-help)
(source #icon)
(newname ("%s.info" @app-name))
(dest #dest)
)
(if
(exists #readme-file)
(copyfiles
(help @copyfiles-help)
(source #readme-file)
(dest #dest)
)
)
(if
(exists ("%s.info" #readme-file))
(copyfiles
(help @copyfiles-help)
(source ("%s.info" #readme-file))
(dest #dest)
)
)
(if
(= #sub-dir "")
("")
(
(set #dest (tackon #dest #sub-dir))
(makedir #dest
(help @makedir-help)
)
)
)
;----------------------------
(until
(exists " :nb" (noreq))
(message
"\n"
"Insert Moonstone Disk A in any drive!\n"
"\n"
"Make sure that no other Moonstone disk is inserted in another drive!"
(all)
)
)
(copyfiles
(help @copyfiles-help)
(source " :")
(dest #dest)
(pattern "~(s|kn1.ob|nb)")
)
(until
(exists " :mi.c" (noreq))
(message
"\n"
"Insert Moonstone Disk B in any drive!\n"
"\n"
"Make sure that no other Moonstone disk is inserted in another drive!"
(all)
)
)
(copyfiles
(help @copyfiles-help)
(source " :")
(dest #dest)
(choices "HE1.ob" "HE2.ob" "HE3.ob" "KN1.ob" "KN2.ob" "KN3.ob" "KN4.ob"
"RATMEN1.CEL" "RATMEN2.CEL" "Ra.a" "Small.font" "TROGGAxe1.CEL"
"TROGGAxe2.CEL" "TROGGSpear1.CEL" "TROGGSpear2.CEL" "TROLL1.CEL"
"TROLL2.CEL" "blo.cel" "ch.piv" "collide.hit" "ki.cel" "kn.a" "mi.c"
"po.cel" "re.a" "sel.cel" "test" "to.a" "tr.a" "wn.a")
)
(until
(exists " :ba.a" (noreq))
(message
"\n"
"Insert Moonstone Disk C in any drive!\n"
"\n"
"Make sure that no other Moonstone disk is inserted in another drive!"
(all)
)
)
(copyfiles
(help @copyfiles-help)
(source " :")
(dest #dest)
(all)
)
;----------------------------
(exit)